//
//  ByWithdrawView.m
//  caipiao_ios
//
//  Created by mc on 2018/8/9.
//  Copyright © 2018年 ZhangZhanbin. All rights reserved.
//

#import "ByWithdrawView.h"

@implementation ByWithdrawView

- (id)init{
    self = [super init];
    if (self) {
        
        self.backgroundColor = [UIColor whiteColor];
        
        UIImageView *typeView = [[UIImageView alloc] init];
        [self addSubview:typeView];
        [typeView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(10);
            make.centerY.equalTo(self).offset(0);
            make.size.mas_equalTo(CGSizeMake(30, 30));
        }];
        typeView.image = [UIImage imageNamed:@"weixin"];
        typeView.userInteractionEnabled = YES;
        
        UILabel *titleLabel = [[UILabel alloc] init];
        [self addSubview:titleLabel];
        [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(typeView.mas_right).offset(10);
            make.centerY.equalTo(self).offset(0);
            make.size.mas_equalTo(CGSizeMake(120, 20));
        }];
        
        titleLabel.font = FONT(14);
        titleLabel.textColor = [UIColor blackColor];
        titleLabel.text = @"微信提现";
        
        
        self.typeView = typeView;
        self.titleLabel = titleLabel;
        
        
        UIImageView *arrowView = [[UIImageView alloc] init];
        [self addSubview:arrowView];
        [arrowView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self).offset(-10);
            make.centerY.equalTo(self).offset(0);
            make.size.mas_equalTo(CGSizeMake(15, 15));
        }];
        arrowView.image = [UIImage imageNamed:@"youjiantou1111"];
        
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)];
        [self addGestureRecognizer:tap];
        
        
    }
    return self;
}

- (void)tapAction:(UITapGestureRecognizer *)tap{
    if (self.withdrawBlock) {
        self.withdrawBlock();
    }
}


@end
